<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDicsTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('dics', function (Blueprint $table) {
            $table->increments('id');
            $table->string('key')->unqiue();    //字典表键值
            $table->string('val')->nulable();   //字典表值
            $table->integer('parent_id')->default(0);   //父键id
            $table->boolean('isactive')->default(1);    //是否启用
            $table->text('remark');  //备注
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('dics');
    }
}
